#include <iostream>
#include <math.h>
#include <string>

using namespace std;

class Logger{
    
private: 
    Logger(){}
    

public:
    
    void print(string str){
	
	cout << str << "\n";

    }

    static Logger* getInstance(){
	static Logger instance;
	return &instance;
    }

    ~Logger(){
	cout << "descructor executed\n" ;

    }

};

void f(){
    Logger* l = Logger::getInstance();
    l -> print("asdsad");
}

int main(){

    f();

    Logger* l = Logger::getInstance();

    l -> print("yohohoh!");

    int iiii = 0;
    cin >> iiii;
    return 0;

}

